#ifndef UTILS_H_
#define UTILS_H_

#define deg(x) (x*180.0/3.1415926)
#define rad(x) (x*3.1415926/180.0)

#define min(a,b) (((a)<(b))?(a):(b))
#define sec(x)  (ctl_get_current_time()+(x)*ctl_get_ticks_per_second())
#define msec(x) (ctl_get_current_time()+(x)*ctl_get_ticks_per_second()/1000)


void swap(int* a, int* b);

#endif